package com.pig4cloud.pig.admin.api.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

@Data
@ColumnWidth(30)
@Schema(description = "输液座位")
@EqualsAndHashCode(callSuper = true)
public class InfusionSeat extends Model<InfusionSeat> {
	private static final long serialVersionUID = 1L;

	@TableId(value = "seat_id", type = IdType.ASSIGN_ID)
	@Schema(description = "座位id")
	@ExcelProperty(value = "座位id")
	private Long seatId;

	@NotBlank(message = "座位名称不能为空")
	@Schema(description = "座位名称")
	@ExcelProperty(value = "座位名称")
	private String seatName;

	@ExcelIgnore
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;

	@ExcelIgnore
	@TableField(fill = FieldFill.UPDATE)
	@Schema(description = "修改人")
	private String updateBy;

	@Schema(description = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	@ExcelProperty(value = "创建时间")
	private LocalDateTime createTime;

	@Schema(description = "修改时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@ExcelProperty(value = "修改时间")
	private LocalDateTime updateTime;

	@TableLogic
	@Schema(description = "删除标记,1:已删除,0:正常")
	@TableField(fill = FieldFill.INSERT)
	@ExcelIgnore
	private String delFlag;
}
